<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>The Crowdsourced Textbook</title>
<!--Importing all the necessary CSS and JavaSccript files
    default.css contains the main styling elements.
    topribbon.css contains styling for the top header and navigation bar.
    sidepanel.css contains styling for the annotation viewing panel on the right.
    navbar.js contains animation JS necessary for the #top_ribbon
    jquery.min.js enables jQuery use in the page.
    base_annotator.js contains the necessary JS elements for the annotation system.
    -->
<link rel="stylesheet" href="css/default.css">
<link rel="stylesheet" href="css/topribbon.css">
<link rel="stylesheet" href="css/sidepanel.css">
<script type="text/javascript" src="js/navbar.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/signinpopup.js"></script>
<script type="text/javascript" src="js/classie.js"></script>
<script type="text/javascript" src="js/base_annotator.js"></script>
</head>

<body>
<div id="body_wrapper">

<div id="top_ribbon">
    <header id="page_header">The Crowdsourced Textbook
    
<!--The script below takes care of the #top_ribbon such that it stays fixed at the top
when the page is scrolling down
-->
    <script>
        $(window).scroll(function() {
            if ($(this).scrollTop() > 1){  
                $('header').addClass("sticky");
            //adds a class .sticky to the header if scrolling is activated
            }
            else{
                $('header').removeClass("sticky");
            //removes a class .sticky to the header if scrolling is activated
            }
        });
    </script>

    <div id="navbar">
    <!--The navigation section at the top of the page-->
        <a href="homepage.html"> HOME </a>
        <a href="help.html"> HELP </a>
        <a href="#"> ABOUT </a>
    </div>
    </header>
</div> 

    <div id="page">
	<div id="maintext" class="maintext" onmouseup='foo(this);'>

    I feel there is no built functions  getting start and end position of selection code. 
    you need to write some JS coding getting these position. Ive wrote just simple coding. 
    Im not sure whether it will be useful or not. But, check it out.<br>
    I feel there is no built functions  getting start and end position of selection code. 
    you need to write some JS coding getting these position. Ive wrote just simple coding. 
    Im not sure whether it will be useful or not. But, check it out.<br>
    I feel there is no built functions  getting start and end position of selection code. 
    you need to write some JS coding getting these position. Ive wrote just simple coding. 
    Im not sure whether it will be useful or not. But, check it out.<br>
    I feel there is no built functions  getting start and end position of selection code. 
    you need to write some JS coding getting these position. Ive wrote just simple coding. 
    Im not sure whether it will be useful or not. But, check it out.<br>

    As the circumstances of his marriage illustrate his character, I cannot refrain from 
    relating them. One of his most intimate friends was a merchant who, from a flourishing 
    state, fell, through numerous mischances, into poverty. This man, whose name was Beaufort, 
    was of a proud and unbending disposition and could not bear to live in poverty and oblivion
     in the same country where he had formerly been distinguished for his rank and magnificence. 
     Having paid his debts, therefore, in the most honourable manner, he retreated with his 
     daughter to the town of Lucerne, where he lived unknown and in wretchedness. <br>
     My father 
     loved Beaufort with the truest friendship and was deeply grieved by his retreat in 
     these unfortunate circumstances. He bitterly deplored the false pride which led his 
     friend to a conduct so little worthy of the affection that united them. He lost no 
     time in endeavouring to seek him out, with the hope of persuading him to begin the 
     world again through his credit and assistance. Beaufort had taken effectual measures 
     to conceal himself, and it was ten months before my father discovered his abode. 
     Overjoyed at this discovery, he hastened to the house, which was situated in a mean 
     street near the Reuss. But when he entered, misery and despair alone welcomed him.
      Beaufort had saved but a very small sum of money from the wreck of his fortunes, 
      but it was sufficient to provide him with sustenance for some months, 
      and in the meantime he hoped to procure some respectable employment in a merchant's house. 
      The interval was, consequently, spent in inaction; his grief only became more deep and 
      rankling when he had leisure for reflection, and at length it took so fast hold of his 
      mind that at the end of three months he lay on a bed of sickness, incapable of any exertion. 

      My father 
     loved Beaufort with the truest friendship and was deeply grieved by his retreat in 
     these unfortunate circumstances. He bitterly deplored the false pride which led his 
     friend to a conduct so little worthy of the affection that united them. He lost no 
     time in endeavouring to seek him out, with the hope of persuading him to begin the 
     world again through his credit and assistance.

     As the circumstances of his marriage illustrate his character, I cannot refrain from 
    relating them. One of his most intimate friends was a merchant who, from a flourishing 
    state, fell, through numerous mischances, into poverty. This man, whose name was Beaufort, 
    was of a proud and unbending disposition and could not bear to live in poverty and oblivion
     in the same country where he had formerly been distinguished for his rank and magnificence. 
     Having paid his debts, therefore, in the most honourable manner, he retreated with his 
     daughter to the town of Lucerne, where he lived unknown and in wretchedness. <br>
     My father 
     loved Beaufort with the truest friendship and was deeply grieved by his retreat in 
     these unfortunate circumstances. He bitterly deplored the false pride which led his 
     friend to a conduct so little worthy of the affection that united them. He lost no 
     time in endeavouring to seek him out, with the hope of persuading him to begin the 
     world again through his credit and assistance. Beaufort had taken effectual measures 
     to conceal himself, and it was ten months before my father discovered his abode. 
     Overjoyed at this discovery, he hastened to the house, which was situated in a mean 
     street near the Reuss. But when he entered, misery and despair alone welcomed him.
      Beaufort had saved but a very small sum of money from the wreck of his fortunes, 
      but it was sufficient to provide him with sustenance for some months, 
      and in the meantime he hoped to procure some respectable employment in a merchant's house. 
      The interval was, consequently, spent in inaction; his grief only became more deep and 
      rankling when he had leisure for reflection, and at length it took so fast hold of his 
      mind that at the end of three months he lay on a bed of sickness, incapable of any exertion. 

</div>

<!-- Starting a PHP session to keep track of the present user-->
<?php session_start(); ?>

<script>
//this takes care of the actions executed when a text is selected of the
//purpose of annotating a piece of text
<?php include 'highlight_annotated.inc.php'; ?>
</script>

<aside>
    
    <div id="login_details">
        <?php
            include 'signinstatus.php';
        ?>
    </div>
    
    <div id="rightpanel" class="rightpanel" >
    
    <div id='annotation_panel_header'>ANNOTATIONS
    </div>

    <?php include 'show_annotations.php'; ?>

    </div>
</aside>

</div>
<!--
<footer>
A Creative Commons Project<br>2014
</footer>
-->


<div id="fade" class="black_overlay">
                    </div>
</div>

</body>

</html>